Optimal. Leaf size=44 \[ \sqrt{3} \tan ^{-1}\left (\frac{x+1}{\sqrt{3} \sqrt{x^2+2 x+5}}\right )-\tanh ^{-1}\left (\sqrt{x^2+2 x+5}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0522627, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {1025, 982, 204, 1024, 206} \[ \sqrt{3} \tan ^{-1}\left (\frac{x+1}{\sqrt{3} \sqrt{x^2+2 x+5}}\right )-\tanh ^{-1}\left (\sqrt{x^2+2 x+5}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1025
Rule 982
Rule 204
Rule 1024
Rule 206
Rubi steps
\begin{align*} \int \frac{4+x}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx &=\frac{1}{2} \int \frac{2+2 x}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx+3 \int \frac{1}{\left (4+2 x+x^2\right ) \sqrt{5+2 x+x^2}} \, dx\\ &=-\left (2 \operatorname{Subst}\left (\int \frac{1}{2-2 x^2} \, dx,x,\sqrt{5+2 x+x^2}\right )\right )-12 \operatorname{Subst}\left (\int \frac{1}{-24-2 x^2} \, dx,x,\frac{2+2 x}{\sqrt{5+2 x+x^2}}\right )\\ &=\sqrt{3} \tan ^{-1}\left (\frac{1+x}{\sqrt{3} \sqrt{5+2 x+x^2}}\right )-\tanh ^{-1}\left (\sqrt{5+2 x+x^2}\right )\\ \end{align*}
Mathematica [C] time = 0.0539322, size = 101, normalized size = 2.3 \[ -\frac{1}{2} \left (1+i \sqrt{3}\right ) \tanh ^{-1}\left (\frac{-i \sqrt{3} x-i \sqrt{3}+4}{\sqrt{x^2+2 x+5}}\right )-\frac{1}{2} \left (1-i \sqrt{3}\right ) \tanh ^{-1}\left (\frac{i \sqrt{3} x+i \sqrt{3}+4}{\sqrt{x^2+2 x+5}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.046, size = 40, normalized size = 0.9 \begin{align*} -{\it Artanh} \left ( \sqrt{{x}^{2}+2\,x+5} \right ) +\sqrt{3}\arctan \left ({\frac{\sqrt{3} \left ( 2\,x+2 \right ) }{6}{\frac{1}{\sqrt{{x}^{2}+2\,x+5}}}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x + 4}{\sqrt{x^{2} + 2 \, x + 5}{\left (x^{2} + 2 \, x + 4\right )}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.28286, size = 327, normalized size = 7.43 \begin{align*} -\sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x + 2\right )} + \frac{1}{3} \, \sqrt{3} \sqrt{x^{2} + 2 \, x + 5}\right ) + \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3} x + \frac{1}{3} \, \sqrt{3} \sqrt{x^{2} + 2 \, x + 5}\right ) + \frac{1}{2} \, \log \left (x^{2} - \sqrt{x^{2} + 2 \, x + 5}{\left (x + 2\right )} + 3 \, x + 6\right ) - \frac{1}{2} \, \log \left (x^{2} - \sqrt{x^{2} + 2 \, x + 5} x + x + 4\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x + 4}{\left (x^{2} + 2 x + 4\right ) \sqrt{x^{2} + 2 x + 5}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.12917, size = 146, normalized size = 3.32 \begin{align*} -\sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x - \sqrt{x^{2} + 2 \, x + 5} + 2\right )}\right ) + \sqrt{3} \arctan \left (-\frac{1}{3} \, \sqrt{3}{\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}\right ) + \frac{1}{2} \, \log \left ({\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}^{2} + 4 \, x - 4 \, \sqrt{x^{2} + 2 \, x + 5} + 7\right ) - \frac{1}{2} \, \log \left ({\left (x - \sqrt{x^{2} + 2 \, x + 5}\right )}^{2} + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]